
pkgname=libffi
pkgver=3.2.1
pkgrel=5
pkgdesc="A portable, high level programming interface to various calling conventions."
arch=('x86_64')
license=('MIT')
url="https://sourceware.org/libffi"
depends=('glibc')
options=('!libtool')
source=("ftp://sourceware.org/pub/libffi/libffi-${pkgver}.tar.gz"
        'libffi.pc.patch')
md5sums=('83b89587607e3eb65c70d361f13bab43'
         'd5679972e3f98288fa410a965d8efbcc')

build() {
  cd ${pkgname}-${pkgver}
  #patch -p1 -i ${srcdir}/libffi.pc.patch
  
  autoreconf -fi
  ./configure --prefix=/usr --disable-static
  make 
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install 
  
  install -m755 -d ${pkgdir}/usr/share/licenses/${pkgname}
  install -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/ 
}
